<?php include_once './application/views/sys_admin/common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/account_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>商城管理</strong> &gt;&gt;  积分列表
		</div>
		
		<div class="admin_right_con" >
			<table border="0" cellspacing="1" cellpadding="0">
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>积分编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户名</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>总积分</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>可用积分</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>不可用积分</strong></td>
			  </tr>
			   <?php foreach($list as $key=>$credit){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $credit['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $credit['username'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($credit['credit_value'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($credit['available'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($credit['no_available'],2);?></td>
			  </tr>
			  <?php }?>
			  <tr>
			  	<td colspan="4" height="35" align="left" valign="middle" bgcolor="#FFFFFF">
			  		<form action="/sys_admin/credit/clist/" method="get">
			  			用户名称：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo $username?>" />
			  			用户类型：<select id="is_loan" name="is_loan">
			  				<option value="-1" <?php if($is_loan==-1){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($var_user_loan as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($is_loan==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			是否内部账号：<select id="is_self" name="is_self">
			  				<option value="-1" <?php if($is_self==-1){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($user_self as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($is_self==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			<input type="submit" value="查询" />
			  		</form>
			  	</td>
			  	<td colspan="2" height="35" align="right" valign="middle" bgcolor="#FFFFFF"><a href="/sys_admin/credit/clist_excle/?username=<?php echo $username;?>">导出数据</a></td>
			  </tr>
			   <tr>
			   	<td  bgcolor="#FFFFFF"><font style="color:red;">可用积分总数为:<?php echo $total?></font></td>
			  	<td colspan="5"  height="35" align="center" valign="middle" bgcolor="#FFFFFF" class="page"><?php echo $this->pagination->create_links();?>共<?php echo $count;?>条记录</td>
			  </tr>
			</table>
			
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
</body>
</html>
